// 下载文件
export default defineEventHandler(async (event) => {
    const token = getTokenFromHeader(event)
    if (!token) {
        return createError({
            statusCode: 401,
            statusMessage: 'Unauthorized',
        })
    }

    const { key } = await readBody(event)
    const result = await getFile(key)
    return result
})  